<!DOCTYPE html>
<html lang="zh-CN">
 
 <head>
 <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
 <title>表格</title>
 <meta name="keywords" content="表格">
 <meta name="description" content="这真的是一个表格" />
 <meta name="HandheldFriendly" content="True" />
 <link rel="shortcut icon" href="img/favicon.ico">
 <!-- Bootstrap3.3.5 CSS -->
 <link href="bootstrap/css/bootstrap.css" rel="stylesheet">
 
 <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
 <!--[if lt IE 9]>
  <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
 </head>
 
 <body>
 <div class="panel-group">
 <div class="panel panel-primary">
 <div class="panel-heading">
  月度结算
 </div>
 <div class="panel-body">
  <div class="list-op" id="list_op">
    
    <form action="" method="POST" class="form-inline" role="form">
    
        <div class="form-group">
            <label class="" for="">老人:</label>
            <input type="text" class="form-control input-sm" id="" placeholder="老人姓名">
        </div>
        <div class="form-group">
                <label class="" for="">单据时间:</label>
                <input type="date" name="" id="">-
                <input type="date" name="" id="">
            </div>
            
        
    
        <button type="submit" class="btn btn-info btn-sm">查询</button>    <button type="button" class="btn btn-info btn-sm">全部数据</button>
        <button type="button" class="btn btn-success btn-sm">导出</button>
        <button type="button" class="btn btn-success btn-sm">打印</button>
        <button type="button" class="btn btn-primary btn-lg">结算已选中账单</button>
    </form>

    </div>
 </div>
 <table class="table table-bordered table-condensed table-hover text-center">
  <thead>
  <tr class="success text-center">
  <th>操作</th>
  <th>姓名</th>
  <th>身份证号</th>
  <th>用户编号</th>
  <th>入住日期</th>
  <th>应收金额</th>
  <th>单据类型</th>
  <th>单据状态</th>
  <th>单据时间</th>
  <th>制单人</th>
  <th>备注</th>
  </tr>
  </thead>
  <tbody>
        <tr>
                <td> 
                <button type="button" class="btn btn-info btn-sm">账单结算</button>
                <button type="button" class="btn btn-info btn-sm">打印</button>
                 </td>
                <td>阿三</td>
               <td>34012220xxxxxx</td>
                <td>180002233</td>
                <td>2018-3-2</td>
                <td>2001.00</td>
                <td>月度结算</td>
                <td>未结算</td>
                <td>2019-4-2</td>
                <td>安泰</td>
                <td>没有备注</td>
            </tr>
            <tr>
                    <td> 
                    <button type="button" class="btn btn-info btn-sm">账单结算</button>
                    <button type="button" class="btn btn-info btn-sm">打印</button>
                     </td>
                    <td>阿三</td>
                   <td>34012220xxxxxx</td>
                    <td>180002233</td>
                    <td>2018-3-2</td>
                    <td>2001.00</td>
                    <td>月度结算</td>
                    <td>未结算</td>
                    <td>2019-4-2</td>
                    <td>安泰</td>
                    <td>没有备注</td>
                </tr>
                <tr>
                        <td> 
                        <button type="button" class="btn btn-info btn-sm">账单结算</button>
                        <button type="button" class="btn btn-info btn-sm">打印</button>
                         </td>
                        <td>阿三</td>
                       <td>34012220xxxxxx</td>
                        <td>180002233</td>
                        <td>2018-3-2</td>
                        <td>2001.00</td>
                        <td>月度结算</td>
                        <td>未结算</td>
                        <td>2019-4-2</td>
                        <td>安泰</td>
                        <td>没有备注</td>
                    </tr>
                    <tr>
                            <td> 
                            <button type="button" class="btn btn-info btn-sm">账单结算</button>
                            <button type="button" class="btn btn-info btn-sm">打印</button>
                             </td>
                            <td>阿三</td>
                           <td>34012220xxxxxx</td>
                            <td>180002233</td>
                            <td>2018-3-2</td>
                            <td>2001.00</td>
                            <td>月度结算</td>
                            <td>未结算</td>
                            <td>2019-4-2</td>
                            <td>安泰</td>
                            <td>没有备注</td>
                        </tr>
                        <tr>
                                <td> 
                                <button type="button" class="btn btn-info btn-sm">账单结算</button>
                                <button type="button" class="btn btn-info btn-sm">打印</button>
                                 </td>
                                <td>阿三</td>
                               <td>34012220xxxxxx</td>
                                <td>180002233</td>
                                <td>2018-3-2</td>
                                <td>2001.00</td>
                                <td>月度结算</td>
                                <td>未结算</td>
                                <td>2019-4-2</td>
                                <td>安泰</td>
                                <td>没有备注</td>
                            </tr>
                            <tr>
                                    <td> 
                                    <button type="button" class="btn btn-info btn-sm">账单结算</button>
                                    <button type="button" class="btn btn-info btn-sm">打印</button>
                                     </td>
                                    <td>阿三</td>
                                   <td>34012220xxxxxx</td>
                                    <td>180002233</td>
                                    <td>2018-3-2</td>
                                    <td>2001.00</td>
                                    <td>月度结算</td>
                                    <td>未结算</td>
                                    <td>2019-4-2</td>
                                    <td>安泰</td>
                                    <td>没有备注</td>
                                </tr>
                                <tr>
                                        <td> 
                                        <button type="button" class="btn btn-info btn-sm">账单结算</button>
                                        <button type="button" class="btn btn-info btn-sm">打印</button>
                                         </td>
                                        <td>阿三</td>
                                       <td>34012220xxxxxx</td>
                                        <td>180002233</td>
                                        <td>2018-3-2</td>
                                        <td>2001.00</td>
                                        <td>月度结算</td>
                                        <td>未结算</td>
                                        <td>2019-4-2</td>
                                        <td>安泰</td>
                                        <td>没有备注</td>
                                    </tr>
                                    <tr>
                                            <td> 
                                            <button type="button" class="btn btn-info btn-sm">账单结算</button>
                                            <button type="button" class="btn btn-info btn-sm">打印</button>
                                             </td>
                                            <td>阿三</td>
                                           <td>34012220xxxxxx</td>
                                            <td>180002233</td>
                                            <td>2018-3-2</td>
                                            <td>2001.00</td>
                                            <td>月度结算</td>
                                            <td>未结算</td>
                                            <td>2019-4-2</td>
                                            <td>安泰</td>
                                            <td>没有备注</td>
                                        </tr>
                                        <tr>
                                                <td> 
                                                <button type="button" class="btn btn-info btn-sm">账单结算</button>
                                                <button type="button" class="btn btn-info btn-sm">打印</button>
                                                 </td>
                                                <td>阿三</td>
                                               <td>34012220xxxxxx</td>
                                                <td>180002233</td>
                                                <td>2018-3-2</td>
                                                <td>2001.00</td>
                                                <td>月度结算</td>
                                                <td>未结算</td>
                                                <td>2019-4-2</td>
                                                <td>安泰</td>
                                                <td>没有备注</td>
                                            </tr>
                                            <tr>
                                                    <td> 
                                                    <button type="button" class="btn btn-info btn-sm">账单结算</button>
                                                    <button type="button" class="btn btn-info btn-sm">打印</button>
                                                     </td>
                                                    <td>阿三</td>
                                                   <td>34012220xxxxxx</td>
                                                    <td>180002233</td>
                                                    <td>2018-3-2</td>
                                                    <td>2001.00</td>
                                                    <td>月度结算</td>
                                                    <td>未结算</td>
                                                    <td>2019-4-2</td>
                                                    <td>安泰</td>
                                                    <td>没有备注</td>
                                                </tr>
                                                <tr>
                                                        <td> 
                                                        <button type="button" class="btn btn-info btn-sm">账单结算</button>
                                                        <button type="button" class="btn btn-info btn-sm">打印</button>
                                                         </td>
                                                        <td>阿三</td>
                                                       <td>34012220xxxxxx</td>
                                                        <td>180002233</td>
                                                        <td>2018-3-2</td>
                                                        <td>2001.00</td>
                                                        <td>月度结算</td>
                                                        <td>未结算</td>
                                                        <td>2019-4-2</td>
                                                        <td>安泰</td>
                                                        <td>没有备注</td>
                                                    </tr>
                                                                                                                                                                                                                
            <tr>
                    <td> 
                    <button type="button" class="btn btn-info btn-sm">账单结算</button>
                    <button type="button" class="btn btn-info btn-sm">打印</button>
                     </td>
                    <td>阿三</td>
                   <td>34012220xxxxxx</td>
                    <td>180002233</td>
                    <td>2018-3-2</td>
                    <td>2001.00</td>
                    <td>月度结算</td>
                    <td>未结算</td>
                    <td>2019-4-2</td>
                    <td>安泰</td>
                    <td>没有备注</td>
                </tr>
                <tr>
                        <td> 
                        <button type="button" class="btn btn-info btn-sm">账单结算</button>
                        <button type="button" class="btn btn-info btn-sm">打印</button>
                         </td>
                        <td>阿三</td>
                       <td>34012220xxxxxx</td>
                        <td>180002233</td>
                        <td>2018-3-2</td>
                        <td>2001.00</td>
                        <td>月度结算</td>
                        <td>未结算</td>
                        <td>2019-4-2</td>
                        <td>安泰</td>
                        <td>没有备注</td>
                    </tr>
                                          
</tbody>
 </table>
 <div class="panel-footer">
  <nav>
  <ul class="pagination pagination-sm">
   <li class="disabled">
    <a href="#" aria-label="Previous">
    <span aria-hidden="true">«</span>
    </a>
   </li>
   <li class="active"><a href="#">1</a></li>
   <li><a href="#">2</a></li>
   <li><a href="#">3</a></li>
   <li><a href="#">4</a></li>
   <li><a href="#">5</a></li>
   <li>
   <a href="#" aria-label="Next">
   <span aria-hidden="true">»</span>
   </a>
   </li>
  </ul>
  </nav>
 </div><!-- end of panel-footer -->
 </div><!-- end of panel -->
 </div>
 <!-- jQuery1.11.3 (necessary for Bo otstrap's JavaScript plugins) -->
 <script src="js/jquery-2.1.3.min.js"></script>
 <!-- Include all compiled plugins (below), or include individual files as needed -->
 <script src="bootstrap/js/bootstrap.js"></script>
 <script>
 $(function(){
 function initTableCheckbox() {
 var $thr = $('table thead tr');
 var $checkAllTh = $('<th><input type="checkbox" id="checkAll" name="checkAll" /></th>');
 /*将全选/反选复选框添加到表头最前，即增加一列*/
 $thr.prepend($checkAllTh);
 /*“全选/反选”复选框*/
 var $checkAll = $thr.find('input');
 $checkAll.click(function(event){
  /*将所有行的选中状态设成全选框的选中状态*/
  $tbr.find('input').prop('checked',$(this).prop('checked'));
  /*并调整所有选中行的CSS样式*/
  if ($(this).prop('checked')) {
  $tbr.find('input').parent().parent().addClass('warning');
  } else{
  $tbr.find('input').parent().parent().removeClass('warning');
  }
  /*阻止向上冒泡，以防再次触发点击操作*/
  event.stopPropagation();
 });
 /*点击全选框所在单元格时也触发全选框的点击操作*/
 $checkAllTh.click(function(){
  $(this).find('input').click();
 });
 var $tbr = $('table tbody tr');
 var $checkItemTd = $('<td><input type="checkbox" name="checkItem" /></td>');
 /*每一行都在最前面插入一个选中复选框的单元格*/
 $tbr.prepend($checkItemTd);
 /*点击每一行的选中复选框时*/
 $tbr.find('input').click(function(event){
  /*调整选中行的CSS样式*/
  $(this).parent().parent().toggleClass('warning');
  /*如果已经被选中行的行数等于表格的数据行数，将全选框设为选中状态，否则设为未选中状态*/
  $checkAll.prop('checked',$tbr.find('input:checked').length == $tbr.length ? true : false);
  /*阻止向上冒泡，以防再次触发点击操作*/
  event.stopPropagation();
 });
 /*点击每一行时也触发该行的选中操作*/
 $tbr.click(function(){
  $(this).find('input').click();
 });
 }
 initTableCheckbox();
 });
 </script>
 </body>
 
</html>